//
//  FindHeadView.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2019/3/12.
//  Copyright © 2019 Gox_WallyDiao. All rights reserved.
//

import UIKit

class FindHeadView: UIView {
    var tapBlock:(() -> Void)?
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        self.backgroundColor = RGB(230, 67, 64, 0.9)
        
        let imageView = UIImageView.init(frame: FRAME_CGFloat(10, 12, 11, 11))
        imageView.image = IMAGE(name: "record通知")
        self.addSubview(imageView)
        
        let label = UILabel.init(frame: FRAME_CGFloat(31, 10, 225, 15))
        label.text = "查看更多已收藏节目详情, 前往 记录—收藏 或 "
        label.textColor = .white
        label.font = Font_Medium(11)
        self.addSubview(label)
        
        let btn = UIButton.init(type: .custom)
        btn.frame = FRAME_CGFloat(256, 10, 75, 15)
        btn.titleLabel?.font = Font_Semibold(11)
        btn.setTitle("点击这里跳转", for: .normal)
        btn.addTarget(self, action: #selector(tapBtnAction), for: .touchUpInside)
        self.addSubview(btn)
    }
    
    @objc func tapBtnAction() {
        tapBlock!()
    }
    
}
